/*****************************************************************************
 *
 * HUSONG PROPRIETARY INFORMATION
 *
 * The information contained herein is proprietary to HUSONG
 * and shall not be reproduced or disclosed in whole or in part
 * or used for any design or manufacture
 * without direct written authorization from HUSONG.
 *
 * Copyright (c) 2015 by HUSONG. All rights reserved.
 *
 *****************************************************************************/
package me.send.broker.service;

import java.util.List;
import java.util.Map;

import me.send.broker.entity.User;
import me.send.broker.entity.base.Page;
import me.send.broker.pojo.Data;
import me.send.broker.pojo.OrderInfoBean;
import me.send.broker.pojo.OrderInfoV1_1Bean;
import me.send.broker.pojo.OrderInfoV1_1_1Bean;
import me.send.broker.pojo.OrderInfoV1_1_2Bean;
import me.send.broker.pojo.OrderMap;
import me.send.broker.pojo.TaskBean;

/**
 * @author maxmin
 *
 * @date 2015年8月4日 下午2:52:37
 */
public interface OrderService {
    // 经纪人抢单
    public int competing(int popid, int orderid,String longitude,String latitude);
    
    /**
     * 已购买
     * @param popid
     * @param orderid
     */
    public int purchased(int popid, int orderid,double fee,int adverttype);
    
    /**
     * 已完成
     * @param popid
     * @param orderid
     */
    public int finished(int popid, int orderid);
    
    /**
     * 已取货
     * @param popid
     * @param orderid
     */
    public int collected(int popid, int orderid);
    
    /**
     *  首页
     * @param ppage
     * @param type
     * @return
     */
    public List<OrderMap> home(Page ppage,int type);
    
    /**
     *  页数
     * @param ppage
     * @param type
     * @return
     */
    public Data countPage(Page ppage,int type);
    
    /**
     * 获取经纪人任务列表
     * @param brokerid
     * @return
     */
    public List<TaskBean> taskList(Map<String, Object> params);
    
    /**
     * 获取用户isvAccount帐号
     * @param orderid
     * @return
     */
    public String getUserByOrderId(int orderid);
    
    /**
     * 根据订单id获取用户id
     * @param orderid
     * @return
     * @author maxmin
     * @date 2015年8月25日下午2:29:16
     */
    public int getUserIdByOrderId(int orderid);
    
    /**
     * 获取订单详情
     * @param orderid
     * @return
     */
    public OrderInfoBean getOrderInfo(int orderid);
    /**
     * 获取订单详情V1.1
     * @param orderid
     * @return
     */
    public OrderInfoV1_1Bean getOrderInfoForV1_1(int orderid);
    /**
     * 获取订单详情V1.1.1
     * @param orderid
     * @return
     */
    public OrderInfoV1_1_1Bean getOrderInfoForV1_1_1(int orderid);
    /**
     * 获取订单详情V1.1.2
     * @param orderid
     * @return
     */
    public OrderInfoV1_1_2Bean getOrderInfoForV1_1_2(int orderid);
    /**
     * 经纪人同意取消订单
     * @param orderid
     * @param brokerid
     * @return
     * @author maxmin
     * @date 2015年10月9日上午11:03:38
     */
    public int deleteOrder(int orderid, int brokerid);
    
    /**
     * 获取经纪人完成的记录
     * @param brokerid
     * @return
     */
    public List<TaskBean> completedRecord(int brokerid,int startid,int size);
    
    /**
     * 根据订单号获取用户信息
     * @param orderid
     * @return
     * @author maxmin
     * @date 2015年10月15日下午5:30:12
     */
    public User getUserByOrder(int orderid);
}
